home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Msgs / c / printf < prev    next >
Text File  |  1995-07-08  |  1KB  |  38 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Msgs.printf.c
  12.     Author:  Copyright © 1992 Jason Williams
  13.     Version: 1.00 (08 Apr 1992)
  14.     Purpose: MessageTrans-like message handling functions.
  15.              (If you want MessageTrans, use the SWI interface, if you want
  16.              high-level message handling, use this code...)
  17. */
  18.  
  19. #include <stdarg.h>
  20. #include <stdio.h>
  21.  
  22. #include "DeskLib:Msgs.h"
  23.  
  24.  
  25. extern void Msgs_printf(char *result, char *formattag, ...)
  26. {
  27.   va_list ap;
  28.   char temp[1024];
  29.  
  30.   result[0] = '\0';
  31.   if (Msgs_Lookup(formattag, temp, 1020))
  32.   {
  33.     va_start(ap, formattag);
  34.     vsprintf(result, temp, ap);
  35.     va_end(ap);
  36.   }
  37. }
  38.